using System;
using System.Collections.Generic;
using System.Text;
using FrameworkX.ObjectSpace.Data.Schema;

namespace FrameworkX.TinyCms.Core.Security
{
    public class AccessRight
    {
        private long _accessRightID = 0;
        [PrimaryKey]
        [Int64(false,false)]
        public long AccessRightID
        {
            get { return _accessRightID; }
            set { _accessRightID = value; }
        }
        
        private string _rightName= string.Empty;
        [String(50,false)]
        public string RightName
        {
            get { return _rightName; }
            set { _rightName = value; }
        }

        private string _descriptiveName = string.Empty;
        [String(50, true)]
        public string DescriptiveName
        {
            get { return _descriptiveName; }
            set { _descriptiveName = value; }
        }
        
        private bool _defaultValue = false;
        [Boolean(false,false)]
        public bool DefaultValue
        {
            get { return _defaultValue; }
            set { _defaultValue = value; }
        }

        public override string ToString()
        {
            return this.DescriptiveName;
        }
    }
}
